import { defineComponent } from 'vue'
import style from './MemoCheckBox.module.scss'
import { ElRow, ElCol } from 'element-plus'
export default defineComponent({
  props: {
    label: {
      type: String
    }
  },
  emits: ["listen"],
  setup(props, { emit }) {
    const handleClick = () => {
      console.log('22')
      emit("listen", "222")
    }
    const handleClickLabel = (e) => {
      //阻止事件冒泡
      e.stopPropagation()
      console.log("33", e)
    }
    return { handleClick, handleClickLabel, props }
  },
  render() {
    const { label } = this.props
    const { handleClick, handleClickLabel } = this
    return (
      <ElRow className={style.checkboxContainer} onClick={handleClick} >
        <ElRow className={style.boxContainer}>
          <ElCol className={style.boxIcon}></ElCol>
        </ElRow>
        <ElRow className={style.checkboxLabel} >
          {label}
        </ElRow>
        <ElRow className={style.checkboxStatus}>
          <ElCol>11月19日</ElCol>
        </ElRow>
      </ElRow>
    )
  }
})